package eric.mpab.ui;

import org.eclipse.jface.window.ApplicationWindow;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;

public class MainWindow extends ApplicationWindow {
	private CTabFolder cTabFolder;

	public MainWindow(Shell parentShell) {
		super(parentShell);
		// Auto-generated constructor stub
	}

	protected Point getInitialSize() {
		return new Point(800, 600);
	}

	protected void configureShell(Shell shell) {
		super.configureShell(shell);
		shell.setText("Hello");
	}

	protected Control createContents(Composite parent) {
		this.cTabFolder = new CTabFolder(parent, SWT.CLOSE);

		CTabItem item = new CTabItem(this.cTabFolder, SWT.NONE);
		item.setControl(new Button(this.cTabFolder, SWT.NONE));
		item.setText("HHHH");

		return this.cTabFolder;
	}

	public static void main(String[] args){
		MainWindow win = new MainWindow(null);
		win.setBlockOnOpen(true);
		win.open();
	}
}
